Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature widelines #2091

Closed
wants to merge 2 commits into from
Closed

Feature widelines #2091

wants to merge 2 commits into from

Conversation

jarrodnorwell
Copy link

No description provided.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jarrodnorwell
Copy link
Author

Ignore, sent PR to wrong repo

@billhollings
Copy link
Contributor

@jarrodnorwell

Interesting PR.

void MVKLineWidthCommandEncoderState::encodeImpl(uint32_t stage) {
    if (stage != kMVKGraphicsStageRasterization) { return; }
    if (!_cmdEncoder->_pDeviceFeatures->wideLines) { return; }
    if (![_cmdEncoder->_mtlRenderEncoder respondsToSelector: @selector(setLineWidth:)]) { return; }
    [(id<MVKMTLRenderCommandEncoderLineWidth>)_cmdEncoder->_mtlRenderEncoder setLineWidth: _lineWidth];
}

I assume that [MTLRenderCommandEncoder setLineWidth:] is a private Metal API method?

Ignore, sent PR to wrong repo

If you have a fork repo where you are accumulating use of Metal's private API, it might be good to bring them into the main MoltenVK repo, with an appropriate compile guard macro, such as MVK_USE_METAL_PRIVATE, that could be enabled when building MoltenVK.

Enabling that build setting would almost certainly disqualify an app from distribution via the App Store, but for macOS games that are distributed directly, these features would be functional. And it would give us a basis for requesting Apple to open up some of those private API's.

Are you interested in discussing this?

@jarrodnorwell
Copy link
Author

Hey @billhollings,

This is actually an accumulation of patches from @cdavis5e and eventually @js6i with their Geometry Shader fork, I'm hoping to bring better support to my Yuzu port for iOS (as well as my Citra port to the same platform)

My plan wasn't to merge it into the main repository as it does use private API's as you mentioned and my apps won't be made available on the AppStore

@billhollings
Copy link
Contributor

This is actually an accumulation of patches from @cdavis5e and eventually @js6i with their Geometry Shader fork

@jarrodnorwell @cdavis5e @js6i

As I mention above, it might be helpful to be able to pull these into MoltenVK main, wrapped in a guard macro.

Can we get access to these patches? And/or a list of private functionality that has been added?

@billhollings
Copy link
Contributor

Hmmm...I had forgotten that we'd travelled down this road before in #1657 and #1670. 🤦🏻‍♂️

I'll do further follow up there.

@billhollings
Copy link
Contributor

PR #2137 has added this functionality.

@jarrodnorwell jarrodnorwell deleted the feature-widelines branch February 15, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants